import Vue from 'vue'
import VueRouter from 'vue-router'
// 监测
import Monitor from "../views/monitor/Monitor.vue";
// 信息
import Info from "../views/info/Info.vue";
// 控制
import Control from "../views/control/Control.vue";
// 监控
import SupervisoryControl from "../views/supervisoryControl/SupervisoryControl.vue";
// 设置
import Setting from "../views/setting/Setting.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/monitor"
  },
  {
    path: "/monitor",
    name: "monitor",
    component: Monitor
  },
  {
    path: "/info",
    name: "info",
    component: Info
  },
  {
    path: "/control",
    name: "control",
    component: Control
  },
  {
    path: "/supervisoryControl",
    name: "supervisoryControl",
    component: SupervisoryControl
  },
  {
    path: "/setting",
    name: "setting",
    component: Setting
  }
];

const router = new VueRouter({
  // mode: "history",
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
});

export default router
